package com.lfy.modules.common.custom.constants;

import com.lfy.modules.common.domain.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

@AllArgsConstructor
@Getter
public enum FeedbackEnum implements BaseEnum {
    SUCCESS(1,"已处理"),
    WAITING(0,"待处理"),

    ;

    static {
        map = Arrays.stream(FeedbackEnum.values()).collect(Collectors.toMap(item -> item.code, item -> item.msg));
    }
    final Integer code;
    final String msg;
    private static Map<Integer, String> map;
    public static String getStatus(Integer code) {
        return map.get(code);
    }
}
